package com.by;

/**
 * Hello world!
 *
 */
public class AdapterApp
{
    public static void main( String[] args )
    {
        // 创建音频播放器
        AudioPlayer audioPlayer = new AudioPlayer();

        // 播放 MP3 文件
        audioPlayer.play("mp3", "song.mp3");

        // 使用适配器播放 VLC 文件
        MediaPlayer vlcPlayer = new MediaAdapter("vlc");
        vlcPlayer.play("vlc", "movie.vlc");

        // 使用适配器播放 WAV 文件
        MediaPlayer wavPlayer = new MediaAdapter("wav");
        wavPlayer.play("wav", "sound.wav");
    }
}
